<?php 

session_start();

//print_r($_SESSION);

	require_once("config.php");
	require_once("inc/funciones_d.php");

	//$_GET['p']  tiene el nombre del archivo de la vista a incluir 
	
	
	//verifica la sesion:
	$include=true;
	include("controler/_sesion_check.php");

	
	//toma la pagina de la sesion:
	if (isset($_SESSION['p']) and $_SESSION['p']!="" ) {
		$p = $_SESSION['p'];		
	} else {
		//sino, por defecto va al login
		$p = "usuario_login";
	}
	
	
	//estas variables son provisorias:
	//$p = "habilitacion";
	//$p = "habilitacion_nueva";
	//$p = "usuario_login";
	//$p = "inicio";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>HABILITACIONES</title>

<!-- scripts: -->
<script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.23.custom.min.js"></script>
<script type="text/javascript" src="js/jqgrid/jquery.jqGrid.min.js"></script>
<script type="text/javascript" src="js/jqgrid/grid.locale-es.js"></script>
<script type="text/javascript" src="js/jquery.tooltip.min.js"></script>
<script type="text/javascript" src="js/jquery.print.js"></script>

<script>

//jquerys generales:
$(function() {
	//tooltips
	$('.tooltip').tooltip({
		track: true, 
		delay: 500, 
		showURL: false, 
		showBody: " - ", 
		slideDown: "slow" 
	});
	

	
});
	


</script>


<!-- estilos: -->
<link rel="stylesheet" type="text/css" media="all" href="style/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="all" href="style/jquery-ui-1.8.24.custom.css" />

<link rel="stylesheet" type="text/css" media="all" href="style/reset-css.css" />
<link rel="stylesheet" type="text/css" media="all" href="style/styles.css" />



</head>
<body id="<?=$p?>">
<div id="page">

    <?php include(ABSPATH."views/header.php");?>    
  
  <div id="cuerpo">
    <div class="wrapper">
    <?php include(ABSPATH."views/".$p.".php");?>    
    </div>
  </div>
  
    <?php include(ABSPATH."views/footer.php");?>    

</div>

<pre id="monitor" style='z-index:10000; top:0; left:0; position:absolute; font-size:10px; width:140px; background-color:#fff; color:#789;'>
SESSION
</pre>
<script type="text/javascript">
function monitor() {
    $("#monitor").load("controler/_get_session.php");
    setInterval('monitor()',10000);
}
monitor();
</script>
</body>
</html>